package com.bzyd.mp.controller;

import com.bzyd.mp.enums.SyncType;
import com.bzyd.mp.service.DataSyncTimeService;
import com.bzyd.mp.utils.ReturnUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Description TODO
 * @Author dangxianyue
 * @Date 2023/3/18 10:34
 */
@RestController
public class DataSyncTimeController {

    @Autowired
    private DataSyncTimeService dataSyncTimeService;

    @GetMapping("/getLastSyncTime")
    public Object getLastSyncTime(SyncType syncType) {
        return ReturnUtil.ok(dataSyncTimeService.getLastSyncTime(syncType));
    }
}
